import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home/Home.vue'

Vue.use(VueRouter)

const routes = [{
        path: '/',
        name: 'Home',
        component: Home
    },
    {
        path: '/askdoc',
        name: 'AskDoc',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () =>
            import ( /* webpackChunkName: "about" */ '../views/Menu/Askdoc.vue')
    },
    {
        path: '/riskarea',
        name: 'Riskarea',
        component: () =>
            import ('../views/Menu/Riskarea.vue')
    },
    {
        path: '/prevention',
        name: 'Prevention',
        component: () =>
            import ('../views/Menu/Prevention.vue')
    },
    {
        path: '/travel',
        name: 'Travel',
        component: () =>
            import ('../views/Menu/Travel.vue')
    },
    {
        path: '/city/:cityname',
        name: 'City',
        props: true,
        component: () =>
            import ('../views/Home/VueEchart/City.vue')
    },
    {
        path: '/selectCity',
        name: 'selectCity',
        props: true,
        component: () =>
            import ('../views/Home/SelectCity/SelectCity.vue')
    },

]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router